#include <iostream>
#include <string>


class Entity_Interface
{
public:
    //纯虚函数定义一个方法必须由子类实现
    //纯虚函数语法：virtual returnType method() = 0;
    virtual void GetName() = 0;
};


//继承父类接口之后只有实现了接口中的方法才能进行实例化
class Player : public Entity_Interface
{
public:
    std::string name;


    void GetName() override
    {
        std::cout << name << std::endl;
    }

};

int main()
{
    Player player;
    player.name = "Sun";
    player.GetName();
    return 0;
}